package com.hsc.www.mybatis.soEasy.ee.crudMapper;


import com.hsc.www.mybatis.soEasy.ee.rr.BaseExample;
import com.hsc.www.mybatis.soEasy.ee.rr.Strategy;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

public interface SelectBaseMapper<ID extends Serializable, Entity, Example extends BaseExample> extends BaseMapper {

    int countByExample(@Param("example") Example example);

    int countByEntity(@Param("entity") Entity entity,
                      @Param("strategy") Strategy strategy
    );

    Entity selectByPrimaryKey(@Param("id") ID id,
                              @Param("includeBlobs") boolean includeBlobs
    );

    List<Entity> selectByExample(@Param("example") Example example,
                                 @Param("includeBlobs") boolean includeBlobs
    );

    List<Entity> selectByEntity(@Param("entity") Entity entity,
                                @Param("strategy") Strategy strategy,
                                @Param("includeBlobs") boolean includeBlobs
    );

}
